In U.S. Pat. No. 6,163,780, Hewlett-Packard Company of Palo Alto, Calif., describes a system for concentrating executable computer software code. This system involves parsing the computer software code by means of concentrating software. The concentrating software achieves this by a series of scans of the computer software code.
The first scan identifies all unique classes referenced in the computer software code and includes the identifier of each such class into a “ClassList”. The second scan searches for all unique methods (the identifiers of which are stored in a “MethodList”) and the third scan searches for all unique Fields (the identifiers of which are stored in a “FieldList”).
Every class identified in the ClassList is then scanned to determine whether there are references to further classes not recorded in the ClassList. If so, then the identifier for such classes is added to the ClassList. The process is then repeated in relation to the newly added classes. In this manner, all unique classes referenced in the computer software code are identified in the ClassList.
Once this scan has been completed, every class in the ClassList is again scanned, but this time to determine any further methods not recorded in the MethodList. If a method is found that is not included in the MethodList, then the identifier for the method is added to the MethodList. The process continues until all classes in the ClassList have been scanned for further methods.
A further scan is used to identify all further fields not included in the FieldList and add their identifier to the FieldList. This scan involves traversing all classes in the ClassList and every method in these classes to identify further fields.
The ClassList, MethodList and FieldList are then each sorted and reformatted into a canonical list form. Each class, method and field in the ClassList, MethodList and FieldList, respectively, is also assigned a unique index reference (typically an integer corresponding to the position of the corresponding identifier within the appropriate canonical list).
Local data referenced by each method of each class are then stored in an array for each class. The local data reference in each method is then replaced with the index value of the location of the local data in the array. The computer software code can then be executed with class, method and field invocations being resolved as part of the execution process.
The problem with this arrangement is that the use of index references to corresponding canonical lists hinders upgrading of the computer software code. To elaborate, the computer software code is in concentrated form while, typically, the upgrade bytecode will not. However, if the upgrade bytecode is in concentrated form, there is no guarantee that the canonical lists formed from concentration of the upgrade bytecode will be compatible with the canonical lists formed from concentration of the computer software code. There is also no mechanism for allowing the computer software code to be dynamically upgraded.
Accordingly, there is a need to allow concentrated computer software code to be dynamically upgraded without the need to reconcentrate the computer software code.